import assessCheckApi from './api'
import { axios } from '@/utils/request'
import router from '@/router/index'
import blobType from '@/common/blobType'
var menuType = blobType.menuType
var fywflcodeArr = blobType.fywflcodeArr
var fywflcode = ''
export function ocalityPostAction(data) {
    //console.log('字典传参',data)
    return axios({
      url: assessCheckApi.dict,
      method:'get' ,
      params:data,
      url_1:'outside'
    })
}

// 流程监控列表-分页查询
export function zltxwjFlowJkPage(params){
  return axios({
    url: assessCheckApi.zltxwjFlowJkPage,
    method:'get' ,
    params:{...params},
    url_1:'outside'
  })
}

//质量体系文件-类型-树形结构查询
export function queryTreeList(params){
    return axios({
      url: assessCheckApi.queryTreeList,
      method:'get' ,
      params:{...params},
      url_1:'outside'
    })
  }

// 流程列表-分页查询
export function zltxwjFlowJobPage(params){
    return axios({
      url: assessCheckApi.zltxwjFlowJobPage,
      method:'get' ,
      params:{...params},
      url_1:'outside'
    })
}

// 我的已办
export function myDoneZltxwjFlow(params){
  return axios({
    url: assessCheckApi.myDoneZltxwjFlow,
    method:'get' ,
    params:{...params},
    url_1:'outside'
  })
}

// 查询当前流程任务详情-通过当前流程任务id
export function queryJobByJobId(params){
    return axios({
      url: assessCheckApi.queryJobByJobId,
      method:'get' ,
      params:{...params},
      url_1:'outside'
    })
}

// 撤回流程
export function returnZltxwjFlow(params){
    return axios({
      url: assessCheckApi.returnZltxwjFlow,
      method:'get' ,
      params:{...params},
      url_1:'outside'
    })
}

// 质量体系文件流程-删除
export function deleteZltxwjFlow(params){
    return axios({
      url: assessCheckApi.deleteZltxwjFlow,
      method:'get' ,
      params:{...params},
      url_1:'outside'
    })
}

// 质量体系文件流程保存接口
export function saveZltxwjFlow(data){
    return axios({
      url: assessCheckApi.saveZltxwjFlow,
      method:'post' ,
      data:{...data},
      url_1:'outside'
    })
}

// 质量体系文件流程提交接口
export function submitZltxwjFlow(data){
    return axios({
      url: assessCheckApi.submitZltxwjFlow,
      method:'post' ,
      data:{...data},
      url_1:'outside'
    })
}

// 质量体系文件-上传文件
export function uploadZltxwjFile(parameter){
    return axios({
      url:assessCheckApi.uploadZltxwjFile,
      method:'post',
      data:parameter,
      url_1:'outside'
    })
}

// 质量体系文件-下载文件
export function getZltxwjFile(params){
    return axios({
      url: assessCheckApi.getZltxwjFile,
      method:'get' ,
      params:{...params},
      url_1:'outside',
      responseType: 'arraybuffer'
    })
}

//办理意见

export function handlingOpinionsListServe(params){
  return axios({
    url: assessCheckApi.handlingOpinionsList,
    method:'get' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside'
  })
}

//删除办理意见

export function deleteBatchIdeaServe(params){
  return axios({
    url: assessCheckApi.deleteBatchIdea,
    method:'delete' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside'
  })
}

//添加意见

export function addBatchIdeaServe(params){
  return axios({
    url: assessCheckApi.addBatchIdea,
    method:'post' ,
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside'
  })
}

//批量打印流转审批表
export function queryPrintZltxwjTable(params){
  return axios({
    url: assessCheckApi.queryPrintZltxwjTable,
    method:'post' ,
    data:{...params},
    url_1:'outside'
  })
}

// 服务端-打开在线编辑文档-流程文件
export function openFile(params){
    return axios({
        url: assessCheckApi.openFile,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

// 服务端-打开只读在线文档-流程文件
export function onlineSeeOpenFile(params){
    return axios({
        url: assessCheckApi.onlineSeeOpenFile,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

// 服务端-将word文件关闭并保存-流程文件
export function getWebOfficeDownloadFile(params){
    return axios({
        url: assessCheckApi.getWebOfficeDownloadFile,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

//  发布范围人员列表
export function queryXgxxRyxmList(params){
    return axios({
        url: assessCheckApi.queryXgxxRyxmList,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

//  查询宣贯学习人员姓名列表
export function queryXgxxryList(params){
    return axios({
        url: assessCheckApi.queryXgxxryList,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

// 上传文件-宣贯学习文件
export function uploadXgxxFile(data){
    return axios({
      url: assessCheckApi.uploadXgxxFile,
      method:'post' ,
      data:data,
      url_1:'outside'
    })
}

//  查询文件-宣贯学习文件
export function queryXgxxFile(params){
    return axios({
        url: assessCheckApi.queryXgxxFile,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

//删除文件-宣贯学习文件
export function deleteXgxxFile(params){
    return axios({
      url: assessCheckApi.deleteXgxxFile,
      method:'delete' ,
      params:params,
      url_1:'outside'
    })
}

//  下载文件-宣贯学习文件
export function downloadXgxxFile(params){
    return axios({
        url: assessCheckApi.downloadXgxxFile,
        method:'get' ,
        params:params,
        url_1:'outside',
        responseType: 'arraybuffer'
    })
}

//  通用文件-打开在线文档-只读模式
export function openCommonZdwj(params){
    return axios({
        url: assessCheckApi.openCommonZdwj,
        method:'get' ,
        params:params,
        url_1:'outside'
    })
}

export function downMyQm(params){
  return axios({
    url: assessCheckApi.downMyQm,
    method:'get' ,
    params:params,
    responseType:"arraybuffer",
    url_1:'outside',

  })
}


export function flowzltxwjqueryXgpxFjList(params){
  return axios({
      url: assessCheckApi.flowzltxwjqueryXgpxFjList,
      method:'get' ,
      params:params,
      url_1:'outside'
  })
}
export function zltxwjClientOfficeApiviewXgpxwj(params){
  return axios({
      url: assessCheckApi.zltxwjClientOfficeApiviewXgpxwj,
      method:'get' ,
      params:params,
      url_1:'outside',
      responseType:"arraybuffer",
  })
}


export function flowZltxwjupdateXgwjXxyjById(data){
  return axios({
    url: assessCheckApi.flowZltxwjupdateXgwjXxyjById,
    method:'post' ,
    data:data,
    url_1:'outside'
  })
}

export function flowzltxwjqueryRyXgpxFjList(params){
  return axios({
      url: assessCheckApi.flowzltxwjqueryRyXgpxFjList,
      method:'get' ,
      params:params,
      url_1:'outside'
  })
}



